<!DOCTYPE html>
<html lang="zh_CN">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>解析页</title>
	<meta name="viewport" content="initial-scale=1, maximum-scale=1">
	<!-- <link rel="shortcut icon" href="http://favicon.ico"> -->
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="viewport"
		content="width=device-width, height=device-height, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">

	<!--<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">-->

	<!-- 固定的css 和 common.js 的引用    -->
	<link rel="stylesheet" href="https://gitee.com/huaflower/honeybee-commonfile/raw/master/css/sm.min.css">
	<!--<link rel="stylesheet" href="../css/sm-extend.min.css">-->
	<link rel="stylesheet" href="https://gitee.com/huaflower/honeybee-commonfile/raw/master/css/swiper.min.css">
	<script type="text/javascript" src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/common/common/common.js"></script>
	<script type="text/javascript" src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/js/js/vconsole.min.js"></script>
		<script>
			var vConsole = new VConsole();
		</script>



	<style type="text/css">
		/*css 的样式都放在这里*/
		.mingzi {
			color: #02CAAD;
		}

		#jiexi_content_parsing_parsing_span,
		#jiexi_content_parsing_review_span {
			font-weight: 700;
		}

		/*jiexi_content_type布局*/
		#jiexi_content_type_layout {
			margin-left: 3%;
			width: 94%;
			margin-top: 10px;
			font-weight: 900;
		}

		#jiexi_content_type_span {
			color: #02CAAD;
			border-bottom: solid 2px #02CAAD;
		}

		/*jiexi_content_question布局*/
		#jiexi_content_question_layout {
			margin-left: 3%;
			width: 94%;
			margin-top: 10px;
		}

		/*jiexi_content_options布局*/
		#jiexi_content_options_layout {
			margin-left: 3%;
			width: 94%;
			margin-top: 10px;
		}

		/*对勾样式*/
		.jiexi_duigou {
			/*display: none;*/
			width: 5%;
		}

		.jiexi_options_type {
			border: solid 1px gainsboro;
			margin-bottom: 5px;
			padding-bottom: 5px;
			padding-top: 5px;
			padding-left: 5%;
			border-radius: 2px;
		}

		.jiexi_options_type table,
		.jiexi_options_type table tr {
			width: 100%;
		}

		#jiexi_options_type_td_first {
			width: 5%;
		}

		#jiexi_options_type_td_second {
			width: 90%;
			padding-left: 3%;
			padding-right: 1%;
		}

		/*jiexi_content_parsing布局*/
		#jiexi_content_parsing_layout {
			margin-left: 3%;
			width: 94%;
			margin-top: 30px;
		}

		/*试题详解样式*/
		#jiexi_content_parsing_title {
			color: #02CAAD;
			text-align: center;
			margin-bottom: 10px;
		}

		/*详解,点评,table样式*/
		.table_table_first {
			margin-top: 5px;
			border-bottom: solid 1px gainsboro;
			width: 100%;
			/*border-bottom: none;*/
			/*table-layout:fixed;word-break:break-all*/
			/*word-wrap: break-word;*/
		}

		.table_table_first td {
			/*border: solid red 1px;*/
		}

		.table_table_second {
			margin-top: 5px;
			width: 100%;
			margin-bottom: 2.9rem;
			/*word-wrap: break-word;*/
			/*border-bottom: none;*/
			/*table-layout:fixed;word-break:break-all*/
		}

		#jiexi_content_parsing_parsing_div_first,
		#jiexi_content_parsing_review_div_first {
			padding-top: 10px;
			padding-bottom: 2px;
		}

		/*用户评论样式*/
		#jiexi_parsing_table_img_div {
			margin-right: 2px;
		}

		#jiexi_parsing_table_img_div img {
			border: solid 1px black;
			border-radius: 50%;
			width: 50px;
			height: 50px;
		}

		ul {
			margin: auto;
			margin-left: 2.7rem;
			margin-right: 0rem;
			/*margin-top: 0.1rem;
		margin-bottom: 0.1rem;*/
			padding: 0px;
		}

		li {
			list-style-type: none;
		}

		#aaaaaaa {
			height: 3.4rem;
			background-repeat: no-repeat;
			background-size: 2.5rem 2.5rem;
			background-position: 0rem 50%;
			display: table-cell;
			vertical-align: middle;
		}



		/*写评论样式*/
		.my_short_button {
			font-size: 14px;
			padding-top: 7px;
			padding-bottom: 7px;
			padding-right: 10px;
			padding-left: 10px;
			background-color: #f3564f;
			text-align: center;
			white-space: nowrap;
			border-radius: 5px 5px;
			color: white;
		}

		#jiexi_banner_index {
			width: 100%;
			/*height: 100%;*/
			z-index: 5px;
		}

		#div_pinglun_1 {
			z-index: 15px;
			position: fixed;
			bottom: 0px;
			padding-top: 7.5px;
			padding-bottom: 7.5px;
			padding-left: 8px;
			padding-right: 8px;
			background-color: white;
			width: 100%;
			/*height:2.2rem;*/
			border-top: solid gainsboro 1px;
		}

		#div_pinglun_2 {
			z-index: 15px;
			position: fixed;
			bottom: 0px;
			padding-top: 8px;
			padding-bottom: 8px;
			padding-left: 8px;
			padding-right: 8px;
			background-color: white;
			width: 100%;
			height: 2.2rem;
			border-top: solid gainsboro 1px;

			text-align: center;
			color: #02CAAD;
			font-weight: 700;
			background: url;
		}

		#input_pinglun {
			padding-left: 12px;
			padding-right: 12px;
			padding-top: 5px;
			padding-bottom: 5px;
			width: 70%;
			height: 100%;
			background-color: white;
			border-color: white;
			/*border-width:1px;*/
			border: solid 1px red;

			outline-color: white;
			margin-right: 12px;
		}

		/*整体布局*/
		.page.page-current {
			overflow: auto;
			background-color: white;
		}

		.swiper-slide {
			/* overflow: hidden; */
			/*overflow-x: hidden;*/
			/* overflow-y: auto; */
			/*overflow-y: hidden;*/
		}


		/*banner必备*/
		.content .swiper-container {
			width: 100%;
			height: 100%;
		}
	</style>


</head>

<body>
	<div class="page-group">
		<div class="page page-current">
			<div id="jiexi_banner_index">
				<!-- html代码内容区域 -->
				<div class="content" id="">
					<!-- Slider -->
					<div class="swiper-container" id="">
						<div class="swiper-wrapper" id="jiexi_list">
							<!--<div class="swiper-slide">1</div>
			   			<div class="swiper-slide">2</div>
			   			<div class="swiper-slide">3</div>
			   			<div class="swiper-slide">4</div>-->

						</div>
					</div>
				</div>
			</div>

			<div id="div_pinglun_1" style="z-index: 15;">
				<input onfocus="scrollToEnd(this)" type="text" placeholder="说点什么~" id="input_pinglun" />
				<a href="#" class="my_short_button" onclick="pinglun()" id="id_pinglun">评论</a>
			</div>

			<div id="div_pinglun_2" style="z-index: 15;" onclick="showpinglun()">
				<span id="" onclick="">
					来点评一下吧~
				</span>
			</div>
		</div>
	</div>




	<!-- 固定的js引用，所有的jQuery 要用 $$ 表示 -->
	<script type="text/javascript" src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/js/jquery-1.11.1.min.js"></script>
	<!-- 这一行代码是为了 避免js冲突 -->

	<script type="text/javascript">var $$ = jQuery.noConflict();</script>

	<script type='text/javascript' src='https://gitee.com/huaflower/honeybee-commonfile/raw/master/zepto/zepto.min.js'
		charset='utf-8'></script>
	<script type='text/javascript' src='https://gitee.com/huaflower/honeybee-commonfile/raw/master/js/sm.min.js'
		charset='utf-8'></script>
	<script type='text/javascript' src='https://gitee.com/huaflower/honeybee-commonfile/raw/master/js/sm-extend.min.js' charset='utf-8'></script>
	<script src="https://gitee.com/huaflower/honeybee-commonfile/raw/master/js/swiper/swiper.min.js"></script>

	<script type="text/javascript">
	  // var vConsole = new VConsole();

		var add_ping_id = new Array;
		var jiexi_id = new Array;
		var zuile_id = new Array;
		var canshu_num = 0;
		//	解析回调
		function getParams(data) {
			//	data需要转成json调用 ，函数urlParamParseJson();
			var jsonData = urlParamParseJson(data);
			var params = {
				paper_id:1,
				type:0
				// paper_id:jsonData.paper_id,
				// type:jsonData.type
				// question_id:jsonData.type
			}
			net_request('get', 'user/questionExplainList', params, successCallBack, errorCallBack);
		}

		//	成功的回调解析函数
		function successCallBack(data) {
			if (swiper) {
				swiper.destroy(false)
			}
			$$("#jiexi_list").html('');
			if (isNotNull(data)) {
				//    		console.log("解析数据");
				//    		console.log(data);
				if (data.success == true) {
					//	        	处理curval.type为0时
					var curval = data.data;
					for (var uu = 0; uu < curval.length; uu++) {
						//	          		评论id
						add_ping_id[uu] = "pinglunid_" + curval[uu].question_id;
						jiexi_id[uu] = "jiexiid_" + curval[uu].question_id;
						zuile_id[uu] = curval[uu].question_id;

						var typezero = "";
						typezero += curval[uu].type;
						if (isNotNull(typezero)) {
							//多选题
							if (typezero == "1") {
								var duoxuanti = "多选题";
								var problem = "";//问题
								if (isNotNull(curval[uu].problem)) {
									problem = curval[uu].problem;
								}
								var explain = "";//解析
								if (isNotNull(curval[uu].explain)) {
									explain = curval[uu].explain;
								}
								var answer = "";//答案
								if (isNotNull(curval[uu].answer)) {
									answer = "正确答案&nbsp;" + curval[uu].answer + "&nbsp;&nbsp;";
								}
								var user_answer = "";//用户答案
								if (isNotNull(curval[uu].user_answer)) {
									user_answer = "您的选项&nbsp;" + curval[uu].user_answer + "&nbsp;&nbsp;";
								}
								var tureorfalse = "";
								if (isNotNull(curval[uu].answer) && isNotNull(curval[uu].user_answer)) {
									if (curval[uu].answer == curval[uu].user_answer) {
										tureorfalse = "回答正确";
									} else {
										tureorfalse = "回答错误";
									}
								}

								var zongjietureorfalse = user_answer + tureorfalse;
								//		          			console.log(zongjietureorfalse);
								var error_rate = "";
								if (isNotNull(curval[uu].error_rate)) {
									error_rate = "考友错误率：" + curval[uu].error_rate + "%";
								}


								var jiexicontent_one = '\
				          		<div class="swiper-slide" id="'+ jiexi_id[uu] + '">\
				          			<div id="jiexi_content">\
				          				<div id="jiexi_content_type">\
				          					<div id="jiexi_content_type_layout">\
				          						<span id="jiexi_content_type_span">\
				          							'+ duoxuanti + '\
				          						</span>\
				          					</div>\
				          				</div>\
					          			<div id="jiexi_content_question">\
					          				<div id="jiexi_content_question_layout">\
					          					<span id="jiexi_content_question_layout_span">\
					          						'+ problem + '\
					          					</span>\
					          				</div>\
					          			</div>\
					          			<div id="jiexi_content_options">\
					          				<div id="jiexi_content_options_layout">\
					          				<!--单选题内容区--><!--多选题内容区-->\
					          	';
								var jiexicontent_two = "";
								//							正确答案
								//							console.log(curval[uu].answer);
								//							console.log(curval[uu].user_answer);
								var duo_answer = new Array();
								var duo_user_answer = new Array();
								duo_answer = (curval[uu].answer).split(",");
								duo_user_answer = (curval[uu].user_answer).split(",");
								//							console.log(duo_answer);
								//							console.log(duo_user_answer);
								//							您的选项
								for (var yy = 0; yy < curval[uu].choice.length; yy++) {
									var danxuan_style = "";
									var danxuan_duigou = "";
									//								您的选择
									for (var duouserl = 0; duouserl < duo_user_answer.length; duouserl++) {
										if (duo_user_answer[duouserl] == curval[uu].choice[yy].choice_tag) {
											danxuan_style = "background-color:#02CAAD;border:#02CAAD solid 1px;color:white;";
											danxuan_duigou = "√";
										}
									}
									//								console.log(danxuan_style);
									//								正确答案
									for (var duoanl = 0; duoanl < duo_answer.length; duoanl++) {
										if (duo_answer[duoanl] == curval[uu].choice[yy].choice_tag) {
											danxuan_style = "background-color:none;color:#FF6A49;border:#FF6A49 solid 1px;";
											danxuan_duigou = "";
										}
									}

									jiexicontent_two += '\
												<div id="jiexi_options_type_" class="jiexi_options_type" style="'+ danxuan_style + '">\
													<table>\
														<tr>\
															<td id="jiexi_options_type_td_first">'+ curval[uu].choice[yy].choice_tag + '</td>\
															<td id="jiexi_options_type_td_second">'+ curval[uu].choice[yy].choice + '</td>\
															<td id="jiexi_duigou_" class="jiexi_duigou">'+ danxuan_duigou + '</td>\
														</tr>\
													</table>\
												</div>\
									';
								}

								var jiexicontent_three = '\
					          				</div>\
					          			</div>\
					          			<div id="jiexi_content_parsing">\
											<div id="jiexi_content_parsing_layout">\
												<div id="jiexi_content_parsing_title">\
													<span id="">\
														——————试题详解——————\
													</span>\
												</div>\
												<div id="jiexi_content_parsing_result">\
													<div id="jiexi_content_parsing_result_one">\
														<span style="color:#FF6A49;">'+ answer + '</span>\
														<span>'+ user_answer + '</span>\
														<span>'+ tureorfalse + '</span>\
													</div>\
													<div id="jiexi_content_parsing_result_two">\
														'+ error_rate + '\
													</div>\
												</div>\
												<div id="jiexi_content_parsing_parsing">\
													<div id="jiexi_content_parsing_parsing_div_first">\
														<span id="jiexi_content_parsing_parsing_span">\
															——&nbsp;解析\
														</span>\
													</div>\
													<div id="jiexi_content_parsing_parsing_div_second">\
														'+ explain + '\
													</div>\
												</div>\
												<div id="jiexi_content_parsing_review">\
													<div id="jiexi_content_parsing_review_div_first">\
														<span id="jiexi_content_parsing_review_span">\
															——&nbsp;点评\
														</span>\
													</div>\
													<div id="'+ add_ping_id[uu] + '"></div>\
												</div>\
											</div>\
										</div>\
					          		</div>\
				          		</div>\
				          		';
								var jiexicontent = jiexicontent_one + jiexicontent_two + jiexicontent_three;
								$$("#jiexi_list").append(jiexicontent);
							}
							//单选题
							//		          		console.log(curval[2].problem);
							if (typezero == "0") {
								var danxuanti = "单选题";
								var problem = "";//问题
								if (isNotNull(curval[uu].problem)) {
									problem = curval[uu].problem;
								}
								var explain = "";//解析
								if (isNotNull(curval[uu].explain)) {
									explain = curval[uu].explain;
								}
								var answer = "";//答案
								if (isNotNull(curval[uu].answer)) {
									answer = "正确答案&nbsp" + curval[uu].answer + "&nbsp;&nbsp;";
								}
								var user_answer = "";//用户答案
								if (isNotNull(curval[uu].user_answer)) {
									user_answer = "您的选项&nbsp" + curval[uu].user_answer + "&nbsp;&nbsp;";
								}
								var tureorfalse = "";
								if (isNotNull(curval[uu].answer) && isNotNull(curval[uu].user_answer)) {
									if (curval[uu].answer == curval[uu].user_answer) {
										tureorfalse = "回答正确";
									} else {
										tureorfalse = "回答错误";
									}
								}

								var error_rate = "";
								if (isNotNull(curval[uu].error_rate)) {
									error_rate = "考友错误率：" + curval[uu].error_rate + "%";
								}


								var jiexicontent_one = '\
				          		<div class="swiper-slide" id="'+ jiexi_id[uu] + '">\
				          			<div id="jiexi_content">\
				          				<div id="jiexi_content_type">\
				          					<div id="jiexi_content_type_layout">\
				          						<span id="jiexi_content_type_span">\
				          							'+ danxuanti + '\
				          						</span>\
				          					</div>\
				          				</div>\
					          			<div id="jiexi_content_question">\
					          				<div id="jiexi_content_question_layout">\
					          					<span id="jiexi_content_question_layout_span">\
					          						'+ problem + '\
					          					</span>\
					          				</div>\
					          			</div>\
					          			<div id="jiexi_content_options">\
					          				<div id="jiexi_content_options_layout">\
					          				<!--单选题内容区--><!--多选题内容区-->\
					          	';
								var jiexicontent_two = "";

								for (var yy = 0; yy < curval[uu].choice.length; yy++) {
									var danxuan_style = "";
									var danxuan_duigou = "";
									//								正确答案
									if (curval[uu].choice[yy].choice_tag == curval[uu].answer && curval[uu].choice[yy].choice_tag == curval[uu].user_answer) {
										danxuan_style = "background-color:none;color:#FF6A49;border:#FF6A49 solid 1px;";
										danxuan_duigou = "";
									}
									//								您的选项
									if (curval[uu].choice[yy].choice_tag == curval[uu].user_answer && curval[uu].choice[yy].choice_tag != curval[uu].answer) {
										danxuan_style = "background-color:#02CAAD;border:#02CAAD solid 1px;color:white;";
										danxuan_duigou = "√";
									}

									//								正确答案与选项相同
									if (curval[uu].choice[yy].choice_tag == curval[uu].answer && curval[uu].choice[yy].choice_tag != curval[uu].user_answer) {
										danxuan_style = "background-color:none;color:#FF6A49;border:#FF6A49 solid 1px;";
										danxuan_duigou = "";
									}



									jiexicontent_two += '\
										<div id="jiexi_options_type_" class="jiexi_options_type" style="'+ danxuan_style + '">\
											<table>\
												<tr>\
													<td id="jiexi_options_type_td_first">'+ curval[uu].choice[yy].choice_tag + '</td>\
													<td id="jiexi_options_type_td_second">'+ curval[uu].choice[yy].choice + '</td>\
													<td id="jiexi_duigou_" class="jiexi_duigou">'+ danxuan_duigou + '</td>\
												</tr>\
											</table>\
										</div>\
									';
								}

								var jiexicontent_three = '\
					          				</div>\
					          			</div>\
					          			<div id="jiexi_content_parsing">\
											<div id="jiexi_content_parsing_layout">\
												<div id="jiexi_content_parsing_title">\
													<span id="">\
														——————试题详解——————\
													</span>\
												</div>\
												<div id="jiexi_content_parsing_result">\
													<div id="jiexi_content_parsing_result_one">\
														<span style="color:#FF6A49;">'+ answer + '</span>\
														<span>'+ user_answer + '</span>\
														<span>'+ tureorfalse + '</span>\
													</div>\
													<div id="jiexi_content_parsing_result_two">\
														'+ error_rate + '\
													</div>\
												</div>\
												<div id="jiexi_content_parsing_parsing">\
													<div id="jiexi_content_parsing_parsing_div_first">\
														<span id="jiexi_content_parsing_parsing_span">\
															——&nbsp;解析\
														</span>\
													</div>\
													<div id="jiexi_content_parsing_parsing_div_second">\
														'+ explain + '\
													</div>\
												</div>\
												<div id="jiexi_content_parsing_review">\
													<div id="jiexi_content_parsing_review_div_first">\
														<span id="jiexi_content_parsing_review_span">\
															——&nbsp;点评\
														</span>\
													</div>\
													<div id="'+ add_ping_id[uu] + '"></div>\
												</div>\
											</div>\
										</div>\
					          		</div>\
				          		</div>\
				          		';
								var jiexicontent = jiexicontent_one + jiexicontent_two + jiexicontent_three;
								$$("#jiexi_list").append(jiexicontent);
							}
							//问答题
							if (typezero == "2") {
								var wendati = "问答题";
								var problem = "";//问题
								if (isNotNull(curval[uu].problem)) {
									problem = curval[uu].problem;
								}
								var explain = "";//解析
								if (isNotNull(curval[uu].explain)) {
									explain = curval[uu].explain;
								}
								var answer = "";//答案
								if (isNotNull(curval[uu].answer)) {
									answer = "正确答案：" + curval[uu].answer + "&nbsp;&nbsp;";
								}
								var user_answer = "";//用户答案
								var user_answer_text = "";
								if (isNotNull(curval[uu].user_answer)) {
									user_answer = "您的答案：" + curval[uu].user_answer;
									user_answer_text = curval[uu].user_answer;
									//		          				console.log(user_answer_text);
									//		          				user_answer = "您的答案："+curval[uu].user_answer+"&nbsp;&nbsp;";
								}
								//		          			var tureorfalse="";
								//		          			if(isNotNull(curval[uu].user_answer)){
								//		          				tureorfalse = "回答正确";
								//		          			}else{
								//	          					tureorfalse = "回答错误";
								//	          				}
								var error_rate = "";
								if (isNotNull(curval[uu].error_rate)) {
									error_rate = "考友错误率：" + curval[uu].error_rate + "%";
								}


								var jiexicontent_one = '\
				          		<div class="swiper-slide" id="'+ jiexi_id[uu] + '">\
				          			<div id="jiexi_content">\
				          				<div id="jiexi_content_type">\
				          					<div id="jiexi_content_type_layout">\
				          						<span id="jiexi_content_type_span">\
				          							'+ wendati + '\
				          						</span>\
				          					</div>\
				          				</div>\
					          			<div id="jiexi_content_question">\
					          				<div id="jiexi_content_question_layout">\
					          					<span id="jiexi_content_question_layout_span">\
					          						'+ problem + '\
					          					</span>\
					          				</div>\
					          			</div>\
					          			<div id="jiexi_content_options">\
					          				<div id="jiexi_content_options_layout">\
					          				<!--单选题内容区--><!--多选题内容区-->\
					          	';
								var jiexicontent_two = "";
								jiexicontent_two = '<textarea rows="4" value="" readonly="ture" style="width: 100%;">' + user_answer_text + '</textarea>';
								var jiexicontent_three = '\
					          				</div>\
					          			</div>\
					          			<div id="jiexi_content_parsing">\
											<div id="jiexi_content_parsing_layout">\
												<div id="jiexi_content_parsing_title">\
													<span id="">\
														——————试题详解——————\
													</span>\
												</div>\
												<div id="jiexi_content_parsing_result">\
													<div id="jiexi_content_parsing_result_one">\
														<span style="color:#FF6A49;">'+ answer + '</span>\
														<span>'+ user_answer + '</span>\
													</div>\
													<div id="jiexi_content_parsing_result_two">\
														'+ error_rate + '\
													</div>\
												</div>\
												<div id="jiexi_content_parsing_parsing">\
													<div id="jiexi_content_parsing_parsing_div_first">\
														<span id="jiexi_content_parsing_parsing_span">\
															——&nbsp;解析\
														</span>\
													</div>\
													<div id="jiexi_content_parsing_parsing_div_second">\
														'+ explain + '\
													</div>\
												</div>\
												<div id="jiexi_content_parsing_review">\
													<div id="jiexi_content_parsing_review_div_first">\
														<span id="jiexi_content_parsing_review_span">\
															——&nbsp;点评\
														</span>\
													</div>\
													<div id="'+ add_ping_id[uu] + '"></div>\
												</div>\
											</div>\
										</div>\
					          		</div>\
				          		</div>\
				          		';
								var jiexicontent = jiexicontent_one + jiexicontent_two + jiexicontent_three;
								$$("#jiexi_list").append(jiexicontent);
							}
							//填空题
							if (typezero == "3") {
								var tiankongti = "填空题";
								var problem = "";//问题
								if (isNotNull(curval[uu].problem)) {
									problem = curval[uu].problem;
								}
								var explain = "";//解析
								if (isNotNull(curval[uu].explain)) {
									explain = curval[uu].explain;
								}
								var answer = "";//答案
								if (isNotNull(curval[uu].answer)) {
									answer = "正确答案：" + curval[uu].answer + "&nbsp;&nbsp;";
								}
								var user_answer = "";//用户答案
								var user_answer_input = "";
								if (isNotNull(curval[uu].user_answer)) {
									user_answer = "您的答案：" + curval[uu].user_answer + "&nbsp;&nbsp;";
									user_answer_input = curval[uu].user_answer;
								}
								var tureorfalse = "";
								if (isNotNull(curval[uu].answer) && isNotNull(curval[uu].user_answer)) {
									if (curval[uu].answer == curval[uu].user_answer) {
										tureorfalse = "回答正确";
									} else {
										tureorfalse = "回答错误";
									}
								}

								var error_rate = "";
								if (isNotNull(curval[uu].error_rate)) {
									error_rate = "考友错误率：" + curval[uu].error_rate + "%";
								}


								var jiexicontent_one = '\
				          		<div class="swiper-slide" id="'+ jiexi_id[uu] + '">\
				          			<div id="jiexi_content">\
				          				<div id="jiexi_content_type">\
				          					<div id="jiexi_content_type_layout">\
				          						<span id="jiexi_content_type_span">\
				          							'+ tiankongti + '\
				          						</span>\
				          					</div>\
				          				</div>\
					          			<div id="jiexi_content_question">\
					          				<div id="jiexi_content_question_layout">\
					          					<span id="jiexi_content_question_layout_span">\
					          						'+ problem + '\
					          					</span>\
					          				</div>\
					          			</div>\
					          			<div id="jiexi_content_options">\
					          				<div id="jiexi_content_options_layout">\
					          				<!--单选题内容区--><!--多选题内容区-->\
					          	';
								var jiexicontent_two = '\
					        	<input type="" name="" id="" readonly="readonly" value="'+ user_answer_input + '" style="width: 100%;padding:2px;" />\
					        	';

								var jiexicontent_three = '\
					          				</div>\
					          			</div>\
					          			<div id="jiexi_content_parsing">\
											<div id="jiexi_content_parsing_layout">\
												<div id="jiexi_content_parsing_title">\
													<span id="">\
														——————试题详解——————\
													</span>\
												</div>\
												<div id="jiexi_content_parsing_result">\
													<div id="jiexi_content_parsing_result_one">\
														<span style="color:#FF6A49;">'+ answer + '</span>\
														<span>'+ user_answer + '</span>\
														<span>'+ tureorfalse + '</span>\
													</div>\
													<div id="jiexi_content_parsing_result_two">\
														'+ error_rate + '\
													</div>\
												</div>\
												<div id="jiexi_content_parsing_parsing">\
													<div id="jiexi_content_parsing_parsing_div_first">\
														<span id="jiexi_content_parsing_parsing_span">\
															——&nbsp;解析\
														</span>\
													</div>\
													<div id="jiexi_content_parsing_parsing_div_second">\
														'+ explain + '\
													</div>\
												</div>\
												<div id="jiexi_content_parsing_review">\
													<div id="jiexi_content_parsing_review_div_first">\
														<span id="jiexi_content_parsing_review_span">\
															——&nbsp;点评\
														</span>\
													</div>\
													<div id="'+ add_ping_id[uu] + '"></div>\
												</div>\
											</div>\
										</div>\
					          		</div>\
				          		</div>\
				          		';
								var jiexicontent = jiexicontent_one + jiexicontent_two + jiexicontent_three;
								$$("#jiexi_list").append(jiexicontent);
								//							console.log(add_ping_id[uu]);
							}
						}

						if (uu == 0) {
							getpinglunParams("getpinglunParams?question_id=" + curval[uu].question_id);
						}
					}
					//				for循环结束
				}
			}

			//banner必备
			var swiper = new Swiper('.swiper-container', {
				observer: true, //修改swiper自己或子元素时，自动初始化swiper
				observeParents: true, //修改swiper的父元素时，自动初始化swiper
				on: {
					slideChangeTransitionEnd: function () {
						dis_showpinglun();
						canshu_num = swiper.activeIndex;
						//	    					alert(swiper.activeIndex);
						//	      					add_ping_id[swiper.activeIndex];
						getpinglunParams("getpinglunParams?question_id=" + zuile_id[canshu_num]);
					},
					slidePrevTransitionEnd: function () {
						dis_showpinglun();
						canshu_num = swiper.activeIndex;
						//	    					alert(swiper.activeIndex);
						getpinglunParams("getpinglunParams?question_id=" + zuile_id[canshu_num]);
					}
				}
			});
		}
		// 失败的回调解析函数
		function errorCallBack(data) {
			console.log(data);
		}




		//	评价中question_id的id
		//	var pingjie = "";
		//	评价回调
		function getpinglunParams(data) {
			// 		data需要转成json调用 ，函数urlParamParseJson();
			var jsonData = urlParamParseJson(data);
			var params = {
				question_id: jsonData.question_id,
				limit: '5',
				offest: '0'
			}
			//		网络请求框架，需要传入成功函数回调和 失败函数回调
			net_request('get', 'api/v1/comments', params, pinglunsuccessCallBack, pinglunerrorCallBack);
		}
		//	成功的评价回调
		function pinglunsuccessCallBack(data) {
			if (isNotNull(data)) {
				if (data.success == true) {
					//	        	console.log("评论数据");
					console.log(data);
					var curval = data.data;
					var pinglength = "";
					var ddping = "";
					//	          	if(isNotNull(data.data)){
					////	          		console.log(data.data[0].question_id);
					//	          		pingjie = data.data[0].question_id;
					//	          	}

					//	          	限制评论数量
					//	          	if(curval.length>=5){
					//	          		pinglength=5;
					//	          	}
					//	          	if(curval.length<5){
					//	          		pinglength=curval.length;
					//	          	}
					for (var a = 0; a < curval.length; a++) {
						if (a == 5) {
							break;
						}
						//	          		console.log("aa");
						//	          		#jiexi_parsing_table_img_div为头像位置
						//					#jiexi_review_nickname为用户名
						//					#jiexi_review_time为提交时间

						var avatar_url = curval[a].avatar_url;
						var nickname = curval[a].nickname != '' &&  curval[a].nickname != undefined && curval[a].nickname != null ? curval[a].nickname : '';
						var created_at = curval[a].created_at;
						var pinglun_content = curval[a].content;
						//					console.log(avatar_url);
						if (a == (curval.length - 1) || a == 4) {
							//						console.log(nickname);
							//						ddping += '\
							//		          			<table class="table_table_second"><tr><td>\
							//									<div id="jiexi_parsing_table_img_div">\
							//									<img src="'+avatar_url+'"/>\
							//									</div>\
							//								</td>\
							//								<td>\
							//									<div id="jiexi_review_nickname">'+nickname+'</div>\
							//									<div id="jiexi_review_time">'+created_at+'</div>\
							//								</td>\
							//							</tr>\
							//							<tr><td></td>\
							//								<td>'+pinglun_content+'</td>\
							//							</tr>\
							//						</table>\
							//		          		';
							ddping += '\
							<div id="" class="table_table_second">\
								<div id="aaaaaaa" style="background-image: url('+ avatar_url + ');">\
									<ul >\
										<li class="mingzi">'+ nickname + '</li>\
										<li>'+ created_at + '</li>\
									</ul>\
								</div>\
								<div id="" style="margin-top:-0.5rem;padding-left: 2.7rem;word-wrap: break-word">\
									'+ pinglun_content + '\
								</div>\
							</div>\
						';
						} else {
							//		          		ddping += '\
							//		          			<div>\
							//		          			<table class="table_table_first">\
							//		          				<tr>\
							//		          					<td>\
							//										<div id="jiexi_parsing_table_img_div">\
							//										<img src="'+avatar_url+'"/>\
							//										</div>\
							//									</td>\
							//									<td>\
							//										<div id="jiexi_review_nickname">'+nickname+'</div>\
							//										<div id="jiexi_review_time">'+created_at+'</div>\
							//									</td>\
							//								</tr>\
							//								<tr>\
							//									<td></td>\
							//									<td>'+pinglun_content+'</td>\
							//								</tr>\
							//							</table>\
							//							</div>\
							//		          		';
							ddping += '\
							<div id="" class="table_table_first">\
								<div id="aaaaaaa" style="background-image: url('+ avatar_url + ');">\
									<ul >\
										<li class="mingzi">'+ nickname + '</li>\
										<li>'+ created_at + '</li>\
									</ul>\
								</div>\
								<div id="" style="margin-top:-0.5rem;padding-left: 2.7rem;word-wrap: break-word">\
									'+ pinglun_content + '\
								</div>\
							</div>\
						';
						}
						//					console.log(add_ping_id[0]);
						//					console.log(ddping);
						var addpingid = "#" + add_ping_id[canshu_num];
						//					console.log(canshu_num);
						//					console.log(addpingid);
						$$(addpingid).html(ddping);

						//					console.log(asdad);
					}
					//	          	console.log(ddping);
					//	          	$$(add_ping_id).html(ddping);
				}
			}
		}
		// 	失败的评价回调函数
		function pinglunerrorCallBack(data) {
			console.log(data);
		}




		//	提交评价回调
		function pinglun() {
			var a = $$("#input_pinglun").val();
			// 		data需要转成json调用 ，函数urlParamParseJson();
			if (isNotNull(a)) {

				var params = {
					question_id: zuile_id[canshu_num],
					content: $$("#input_pinglun").val()
				}
				//			网络请求框架，需要传入成功函数回调和 失败函数回调
				net_request('post', 'api/v1/comments', params, pingtisuccessCallBack, pingtierrorCallBack);
				//			$.toast('评论完成', 2000);
				//			console.log(data);			
			} else {
				$.toast('评论不能为空', 2000);
				return;
			}

		}
		//	成功的提交评价回调
		function pingtisuccessCallBack(data) {

			//		console.log("提交评论接口");
			console.log(data);
			getpinglunParams("getpinglunParams?question_id=" + zuile_id[canshu_num]);
			$$("#input_pinglun").val("");
			$.toast('评论完成', 2000);
			dis_showpinglun();
		}

		// 	失败的提交评价回调函数
		function pingtierrorCallBack(data) {
			console.log(data);
		}
		//	隐藏评论		
		function dis_showpinglun() {
			$("#div_pinglun_2").show();
			$("#div_pinglun_1").hide();
		}
		//	展示评论
		function showpinglun() {
			//      noteid = pid;
			$("#div_pinglun_2").hide();
			$("#div_pinglun_1").show();
			$("#input_pinglun").focus();
		}

		$$(function () {
			//		答题接口
					// getParams("getParams?paper_id="+3+"&type="+1);
			//		错题解析
			//		 getParamsjiexi("getParamsjiexi?paper_id="+1+"&type="+1);
			//		所有题解析
					// getParamsjiexi("getParamsjiexi?paper_id="+1+"&type="+0);
			//		评论接口
					// getpinglunParams("getpinglunParams?question_id="+2);
			//		发表评论接口
			
			// getParams();
			// getParams();

			dis_showpinglun();

			$.init();
		});


	</script>
</body>

</html>